# imports
import sys
import re

output = sys.argv[1]
nilTest = output.rfind("]=N")
if(nilTest != -1):
    print "[]"
    sys.exit()
upperBound = output.rfind("]")
lowerBound = output.rfind("[")
value = ""
i = lowerBound + 1
while(i < upperBound):
    value = value + output[i]
    i = i + 1
print value

